package eu.opensepa.lab.ouranos.model;

import java.math.BigDecimal;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class Amount {

	public static Amount newAmount(String ccy, BigDecimal amt) {
		Amount x = new Amount();
		x.setCcy(ccy);
		x.setVal(amt);
		return x;
	}
	
	@Basic(optional=false)
	@Column(name="AMT_CCY", length=3)
	private String ccy;
	
	@Basic(optional=false)
	@Column(name="AMT_VAL", precision=12, scale=2)
	private BigDecimal val;

	public String getCcy() {
		return ccy;
	}

	public void setCcy(String ccy) {
		this.ccy = ccy;
	}

	public BigDecimal getVal() {
		return val;
	}

	public void setVal(BigDecimal amt) {
		this.val = amt;
	}
	
}
